package com.wn.portal.config;

import feign.Logger;
import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yellow Docter
 * @date 2022 -08-24
 * @desc
 */
@Configuration
public class FeignConfig {

    /**
     * RandomRule 负载均衡 进行随机 访问
     * @return
     */
//    @Bean
//    public IRule rules(){
//        return new RandomRule();
//    }

    @Bean
    public Logger.Level loggerLevel(){
        return Logger.Level.FULL;
    }

    // 连接超时进行重试机制
    @Bean
    public Retryer feignRetryer() {
        return new Retryer.Default();
    }


}
